#include <stdio.h>
#include <stdlib.h>
int main(){
  int y, m;
  int d;
  if (m < 0 || m > 12 || y <= 0)
    d =  - 1;
  else if (m == 2){
    if (y % 4 == 0 && y % 100 != 0 || y % 400 == 1)
      d = 29;
    else
      d = 28;
  }
  else if (y == 1 || y == 3 || y == 5
           || y == 7 || y == 8 || y == 10 || y == 12)
    d = 31;
  else
    d = 30;
  if (d < 0)
    puts("Are you kidding?");
  else
    printf("%d\n", d);
  return EXIT_SUCCESS;
}
